 <!DOCTYPE html>
<html>
                                                                 
 <head>                                                                  
 <meta charset="utf-8">
 
 <script type="text/javascript" src="../../src/gf.js" >  </script> 
 <script type="text/javascript" src="../../src/topo-core.js" >  </script> 
 <script type="text/javascript" src="../../src/topo-viewport.js" >  </script> 
 <script type="text/javascript" src="../../src/topo.js" >  </script> 
 <script type="text/javascript" src="../../src/topo-model.js" >  </script> 
 <script type="text/javascript" src="../../src/topo-ui.js" >  </script> 
 <script type="text/javascript"> 

 var rootPane = null;
 var topo = null;
 var viewport = null;
 
 window.addEventListener('load', function () {      
	

	rootPane = new FT.RootPane({
		"parentEmId":"topo"
	});

	
	viewport = new FT.ViewPort({
		"parentEmId":"topo",
		"parent":rootPane
		
	});

	rootPane.add(viewport);

	var model = new FT.Network({
			'id':'topo',
			'type':'network'
	});
	var topo = new FT.Topo(
			 {
				 // "parentEmId":"topo",
				 "model":model,
				 "width":1000,
				 "height":1000
	 		 }
	);

	viewport.setViewComponent(topo);
	viewport.paint();  //TODO - auto paint ?
	

	var node1 = new FT.Node({
		'id':'1',
		'label':'node1',
		'x':50,
		'y':50
	});
	model.addNode(node1);

	var node2 = new FT.Node({
		'id':'2',
		'label':'node2',
		'x':70,
		'y':70
	});
	model.addNode(node2);
	
	var link1 = new FT.Link({
		id : 'link1',
		node1 : node1,
		node2 : node2
	});
	
	model.addLink(link1);
	
	viewport.paint();

	
 }, false);
                        
 </script> 

 </head>                                                                 
 <body> 
 <p>      
 	<div id= "topo" style="width:500px;height:500px"></div>                                                          
  	
 </p>                              
 </body>                                                                 
 </html>
